class NotHeatingState implements State {
    @Override
    public void onTemperatureBelow20AndHasWater(WaterTank tank) {
        if (tank.hasWater()) {
            System.out.println("温度低于20°C且有水，开始加热...");
            tank.setPowerOn(true);
            tank.setCurrentState(new HeatingState());
        } else {
            System.out.println("无水，不能加热。");
        }
    }
    @Override
    public void onTemperatureReached100(WaterTank tank) {}
    @Override
    public void onNoWater(WaterTank tank) {}
    @Override
    public void onBurnedOut(WaterTank tank) {
        tank.setIsBurnedOut(true);
        System.out.println("水箱烧坏！系统停止。");
    }
    @Override
    public void onMorning7(WaterTank tank) {
        System.out.println("早上7点，系统重新激活...");
        tank.setCurrentState(new StartedState());
    }
    @Override
    public void onNight11(WaterTank tank) {}
}